package com.roundarch.www.model;

import java.util.Date;

import com.roundarch.www.DataEntity;

public class Comment extends DataEntity implements Comparable<Comment>{

	private static final long serialVersionUID = -1L;
	
	private String body;
	private Date createdDate = new Date();
	private User owner;
	private Post post;
	
	public String getBody() {
		return body;
	}
	public void setBody(String body) {
		this.body = body;
	}
	public Date getCreatedDate() {
		return createdDate;
	}
	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}
	public User getOwner() {
		return owner;
	}
	public void setOwner(User owner) {
		this.owner = owner;
	}
	public Post getPost() {
		return post;
	}
	public void setPost(Post post) {
		this.post = post;
	}
	
	public int compareTo(Comment o) {
		return o.getCreatedDate().compareTo(createdDate);
	}
	
}
